import React from "react";
import {Button, Grid} from "@material-ui/core";
import AddRounded from "@material-ui/icons/AddRounded";

import {EnhancedTable, Toolbar} from "../../shared/components";

const ViewAllSite = ({onAdd, onRowClick, ...props}) => {

    return (
        <Grid container spacing={4}>
            <Toolbar
                title="Site/Project List"
                actions={<React.Fragment>
                    <Button
                        variant="contained"
                        color="primary"
                        startIcon={<AddRounded/>}
                        onClick={onAdd}
                    >
                        Add Site
                    </Button>
                </React.Fragment>}
            />
            <Grid item xs={12}>
                <EnhancedTable
                    title={"Site List"}
                    schema={[
                        {id: 'id', label: 'Id', sort: true},
                        {id: 'name', label: 'Name', sort: true},
                        {id: 'legalName', label: 'Legal Name', sort: true},
                        {id: 'division', label: 'Division', sort: true},
                        {id: 'manager', label: 'Manager', sort: true},
                        {id: 'dept', label: 'Department', sort: true},
                        {id: 'address', label: 'Address', sort: true},
                        {id: 'city', label: 'City', sort: true},
                        {id: 'country', label: 'Country', sort: true}
                    ]}
                    data={[]}
                    onRowClick={onRowClick}
                />
            </Grid>
        </Grid>
    );
};

export default ViewAllSite;
